package com.ychen.zuul.filter;

import com.netflix.zuul.ZuulFilter;
import com.netflix.zuul.context.RequestContext;
import com.netflix.zuul.exception.ZuulException;
import org.springframework.stereotype.Component;

/**
 * @ Author     ：ChenYuliao
 * @ Date       ：Created in 20:44 2018/9/24 0024
 * @ Description：
 */
@Component
public class JwtFilter extends ZuulFilter{
    @Override
    public String filterType() {
        return "pre";
    }

    /**
     * 值最小越先执行
     * @return
     */
    @Override
    public int filterOrder() {
        return 0;
    }

    @Override
    public boolean shouldFilter() {
        RequestContext ctx = RequestContext.getCurrentContext();
//        ctx.get
        return true;
    }

    @Override
    public Object run() throws ZuulException {
        return null;
    }
}
